<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <!-- style -->
        <div style="color: red;font-size: 50px;">style</div>
        <div v-bind:style="{color:color,fontSize:fontSize}">试试是否可以</div>
        <div :style="{color,fontSize}">精神力回来了！！</div>
        <div :style="yangshi1">男同胞们喜欢的。。。</div>
        <div :style="testYN">男同胞们喜欢的。。。</div>
        <button @click="yorn">yorn</button>

    </div>
    <script src="../js/vue.js"></script>
    <script>
        let vm = new Vue({
            el:'#app',
            data:{
                color:'pink',
                fontSize:'100px',
                yangshi1:{
                    color:'yellow',
                    fontSize:'80px',
                },
                flag:true
            },
            computed:{
                testYN(){
                    return this.flag?this.yangshi1:''

                }
            },
            methods: {
                yorn(){
                    this.flag = !this.flag
                }
            },
        })
    </script>
</body>
</html>